package com.example.datamanage.service;

import com.example.datamanage.common.Result;
import com.example.datamanage.pojo.Connect;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.datamanage.pojo.dto.DataSourceDTO;
import com.example.datamanage.pojo.dto.SearchDTO;

/**
* @author 28142
* @description 针对表【connect(连接表)】的数据库操作Service
* @createDate 2023-07-24 16:57:23
*/
public interface ConnectService extends IService<Connect> {

    Result findPage(Integer pageNum, Integer pageSize, SearchDTO searchDTO);

    boolean saveConn(Connect connect);

    boolean createConn(DataSourceDTO dataSourceDTO) throws NoSuchFieldException, IllegalAccessException;

    boolean testConn(DataSourceDTO dataSourceDTO);

    Result getNameByDataType(String dataType);

    Result getDataNameByDataTypeAndName(String dataType, String name);

    Result getConn(SearchDTO searchDTO);

    Result switchDatasource(String dataType, String name) throws NoSuchFieldException, IllegalAccessException;
}
